<table class="product" align="center" cellpadding="0" cellspacing="0" border="0">
<tr><td>
<div class="product_content" align="center">
<?php for($i=0; $i<count($mlist); $i++){ ?>
  	<div class="product_element" align="center" style="padding-top:5px;">  
  	<?php if($mlist[$i]['products_image'] == ""){
			$image ="".$this->site['base_url']."uploads/product/may.png";
		 } else {
			$image ="".$this->site['base_url']."uploads/product/".$mlist[$i]['products_image']."";
		 }
  	?>
  	<div align="center" class="image"> <a href="<?php echo $this->site['base_url'].'product/detail/'.$mlist[$i]['products_id'].'/'.$mlist[$i]['master_categories_id'] ?>" align="center"><img class="img" src="<?php echo $image ?>"/></a> </div>  
  	<div align="center" class="name"> <a href="<?php echo $this->site['base_url'].'product/detail/'.$mlist[$i]['products_id'].'/'.$mlist[$i]['master_categories_id'] ?>" align="center"><?php echo $mlist[$i]['products_name'] ?> </a> </div> 
	<form method='post' action="<?php echo $this->site['base_url'].'shoppingcart/add/'.$mlist[$i]['products_id'] ?>" >  
    <div class="bottom" align="center">   
	<?php if($mlist[$i]['price'] == "" || $mlist[$i]['price'] == 0 || $mlist[$i]['products_qty'] == "" || $mlist[$i]['products_qty'] == 0){ ?>
		<div align="center" class="price"><span class='price'><?php echo Kohana::lang('product_lang.lbl_call') ?></span></div>
	<?php } else { 
			$price = $mlist[$i]['price'];
			if($mlist[$i]['products_sale_price'] >= $price || $mlist[$i]['products_sale_price'] == 0) { ?>
			<div align="center" class="price"><span class="price"><?php echo $this->format_currency($price,$this->site['site_currency'])?>&nbsp;</span></div>
			<div align="center" class="buy"><input type="submit" class="button" value="<?php echo Kohana::lang('product_lang.btn_buy') ?>"/></div>
			<?php } else { ?>
			<div align="center" class="price"><span class="price"><strike style="color:#000"><?php echo $this->format_currency($price,$this->site['site_currency'])?></strike> </span></div>
			<div align="center" class="price"><span class="price"><?php echo $this->format_currency($mlist[$i]['products_sale_price'],$this->site['site_currency'])?></span></div>
			<div align="center" class="buy"><input type="submit" class="button" value="<?php echo Kohana::lang('product_lang.btn_buy') ?>"/></div>
	<?php }	} ?>   
    </div>
	<input name="txt_item_qty" type="hidden" id="txt_item_qty" value="1" size="2" maxlength="3"/>
	<input type="hidden" name="hd_item_id" id="hd_item_id" value="<?php echo $mlist[$i]['products_id'] ?>" />
	</form>  
  	</div>
<?php } ?>
</div>
</td></tr>
</table>